﻿using System;

namespace EHSubmit.Model
{
    /// <summary>
    ///   Homework对象的命名空间
    /// </summary>  
    public class Homework
    {
        private int _id;                      //作业ID 标识属性
        private int _goalid;                  //课程号
        private string _goalname;
        private string _studentid;            //提交作业的学生ID 
        private string _attachpath;         //用于存放附件路径的地址
        private string _description;          //作业的描述
        private DateTime _submittime;         //作业的提交时间
        private DateTime _updatetime;         //作业的更新时间 用于作业提交后的修改
        private string _subyear;              //作业所属的学年
        private string _term;                 //作业所属的学期
        private int _isdeleted;               //是否被删除
        private int _scores;                  //作业的评分
        private string _comment;              //作业的评价
        private DateTime _commenttime;        //作业评价的时间
        private int _isviewed;                //是否已经看过
        private int _goalType;                //作业类型

        public Homework()
        {
            this.Init();
        }

        /// <summary>
        /// 上交作业信息初始化
        /// </summary>
        /// <returns>初始化后返回真</returns>
        public bool Init()
        {
            this._id = 0;
            this._goalid = 0;
            this._goalname = string.Empty;
            this._studentid = string.Empty;
            this._attachpath = string.Empty;
            this._description = string.Empty;
            this._submittime = DateTime.Now;
            this._updatetime = DateTime.Now;
            this._subyear = string.Empty;
            this._term = string.Empty;
            this._isdeleted = 0;
            this._scores = -1;
            this._comment = string.Empty;
            this._commenttime = DateTime.Now;
            this._isviewed = 0;
            this._goalType = 0;
            return true;
        }


        public Homework(int _id, int _goalid,string _goalname, string _studentid, string _attachpath, string _description, DateTime _submittime, DateTime _updatetime, string _subyear, string _term, int _isdeleted, int _scores, string _comment, DateTime _commenttime, int _isviewed) 
        {
            this._id = _id;
            this._goalid = _goalid;
            this._goalname = _goalname;
            this._studentid = _studentid;
            this._attachpath = _attachpath;
            this._description = _description;
            this._submittime = _submittime;
            this._updatetime = _updatetime;
            this._subyear = _subyear;
            this._term = _term;
            this._isdeleted = _isdeleted;
            this._scores = _scores;
            this._comment = _comment;
            this._commenttime = _commenttime;
            this._isviewed = _isviewed;
        }

        public int ID
        {
            get { return _id; }
            set { _id = value; }
        }

        public int GoalID
        {
            get { return _goalid; }
            set { _goalid = value; }
        }

        public string GoalName
        {
            get { return _goalname; }
            set { _goalname = value; }
        }

        public string StudentID
        {
            get { return _studentid; }
            set { _studentid = value; }
        }

        public string AttachPath
        {
            get { return _attachpath; }
            set { _attachpath = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public DateTime SubmitTime
        {
            get { return _submittime; }
            set { _submittime = value; }
        }

        public DateTime UpdateTime
        {
            get { return _updatetime; }
            set { _updatetime = value; }
        }

        public string SubYear
        {
            get { return _subyear; }
            set { _subyear = value; }
        }

        public string Term
        {
            get { return _term; }
            set { _term = value; }
        }

        public int IsDeleted
        {
            get { return _isdeleted; }
            set { _isdeleted = value; }
        }

        public int Scores
        {
            get { return _scores; }
            set { _scores = value; }
        }

        public string Comment
        {
            get { return _comment; }
            set { _comment = value; }
        }

        public DateTime CommentTime
        {
            get { return _commenttime; }
            set { _commenttime = value; }
        }

        public int IsViewed
        {
            get { return _isviewed; }
            set { _isviewed = value; }
        }

        public int GoalType
        {
            get { return _goalType; }
            set { _goalType = value; }
        }



    }


}